<?php

namespace App\Model;

use Hyperf\DbConnection\Model\Model as BaseModel;
use Qbhy\HyperfAuth\Authenticatable;
use Qbhy\HyperfAuth\UserProvider;


class UserModel extends BaseModel  implements Authenticatable
{


    protected ?string $table = 'users';


    public function getId()
    {
        return $this->id;
    }

    public static function retrieveById($key): ?Authenticatable
    {
        // TODO: Implement retrieveById() method.
        // 假设你使用的是 Eloquent ORM
        $user = self::find($key);

        return $user; // 确保 UserModel 实现了 Authenticatable
    }
}